<template>
	<view class="container">
		<view v-html="content">
		</view>
	</view>
</template>

<script>
	import {
		baseIntroduction
	} from "../../../utils/getDate.js"
	export default {
		data() {
			return {
				content: "",
			}
		},
		onShow() {
			this.onbaseIntroduction()
		},
		methods: {
			onbaseIntroduction() {
				let data = {
					type: "1"
				}
				this.loading = true;
				baseIntroduction(data).then(res => {
					if (res && res.state === "ok") {
						let content = res.data.content
							.replace(/<img([^>]*)width="[^"]*"/gi, '<img$1')
							.replace(/<img([^>]*)height="[^"]*"/gi, '<img$1')
							.replace(/<img/gi,
								'<img style="max-width:100%;height:auto;display:block;margin:0 auto;"');
						this.content = content;
					}
				})
			},


		}
	}
</script>

<style>
	.container {
		padding: 20rpx;
		box-sizing: border-box;
		min-height: 100vh;
		background-color: #f5f5f5;
		display: flex;
		flex-direction: column;
	}

	/* 在对应页面的样式文件中添加 */
	img {
		max-width: 100% !important;
		/* 限制最大宽度为容器宽度 */
		height: auto !important;
		/* 高度自适应 */
		display: block;
		/* 避免图片间出现间隙 */
		margin: 0 auto;
		/* 居中显示 */
	}
</style>